﻿<html lang="ru">
<head>
    <meta charset="utf-8" />
    <title>@ViewBag.Title</title>
    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    @*<script type="text/javascript" src="~/Scripts/jquery-1.8.2.js"></script>*@
    @Scripts.Render("~/bundles/jquery")
    <script type="text/javascript" src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script>
    <meta name="viewport" content="width=device-width" />
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")
    @RenderSection("Styles", false)
    
</head>
<body>
    <div style="display: none" id="ajaxLoad">
        <img src="~/Images/ajax-loader.gif" alt="Идет загрузка" />
    </div>
    <header>
        <div class="content-wrapper">
            <div class="float-left">
                <p class="site-title"><a href="/">
                    <img src="~/Images/TaxiLogo.png" alt="" /></a></p>
            </div>
            <div class="float-right">
                <section id="login">
                    @Html.Partial("_LoginPartial")
                </section>
                @if (User.Identity.IsAuthenticated && User.IsInRole("Admin"))
                {
                    <nav>
                        <ul id="menu">
                            <li>@Html.ActionLink("О программе", "Index", "Home")</li>
                            <li>@Html.ActionLink("Контакты", "Contact", "Home")</li>
                            <li>@Html.ActionLink("Список служб такси", "Taxi", "Home")</li>
                        </ul>
                    </nav>
                }
                else
                {
                     <nav>
                        <ul id="menu">
                            <li>@Html.ActionLink("О программе", "Index", "Home")</li>
                            <li>@Html.ActionLink("Контакты", "Contact", "Home")</li>
                        </ul>
                    </nav>
                }
            </div>
        </div>
    </header>
    <div id="body">
        @RenderSection("featured", required: false)
        <section class="content-wrapper main-content clear-fix">
            @RenderBody()
        </section>
    </div>
    <footer>
        <div class="content-wrapper">
            <div class="float-left">
                <p>&copy; @DateTime.Now.Year — UniTax</p>
            </div>
        </div>
    </footer>


    @RenderSection("scripts", required: false)
</body>
</html>

<script type="text/javascript">
    function showWaitDiv() {
        document.getElementById('ajaxLoad').style.display = 'block';
    }
    function hideWaitDiv() {
        document.getElementById('ajaxLoad').style.display = 'none';
    }
</script>
